<script lang="ts" setup>
//import formPage from "./formPage.vue";

const props = defineProps({
	modelValue: {
		type: Boolean,
		default: false,
	},
	showData: {
		type: Object,
		default: () => {},
	},
});

const emit = defineEmits<{
	(e: "update:modelValue", value: boolean): void;
}>();
const visible = computed({
	get() {
		return props.modelValue;
	},
	set(val) {
		emit("update:modelValue", !!val);
	},
});
</script>
<template>
	<el-dialog v-model="visible" title="查看" width="500px">
		<el-form :model="showData" label-width="auto">
			<el-form-item label="姓名：">{{ showData.doctorName }}</el-form-item>
			<el-form-item label="联系方式：">{{ showData.doctorPhone }}</el-form-item>
			<el-form-item label="执业机构：">{{ showData.institutionName }}</el-form-item>
			<el-form-item label="科室：">{{ showData.departmentName }}</el-form-item>
			<el-form-item label="职称：">{{ showData.staffTitle }}</el-form-item>
			<el-form-item label="执业经验(年)：">{{ showData.workingYear }}</el-form-item>
			<el-form-item label="头像：">
				<el-image
					style="width: 100px; height: 100px"
					:src="showData.doctorIcon"
					:preview-src-list="[showData.doctorIcon]"
					:initial-index="0"
					fit="cover"
				/>
			</el-form-item>
			<el-form-item label="资格证：">
				<el-image
					style="width: 100px; height: 100px"
					:src="showData.doctorStaffPic"
					:preview-src-list="[showData.doctorStaffPic]"
					:initial-index="0"
					fit="cover"
				/>
			</el-form-item>
		</el-form>
	</el-dialog>
</template>
